moji chooser: Try harder to avoid fallback
authorMatthias Clasen <mclasen@redhat.com>
Thu, 19 Jul 2018 21:50:54 +0000 (17:50 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 19 Jul 2018 21:50:54 +0000 (17:50 -0400)
We don't want to see any fallback rendering.
The current check was still letting some fallback
combinations through.

Based on work by Julian Sparber.

gtk/gtkemojichooser.c

index 2a774dbef09930c79a49e61785ac54e3e2382a3a..ad722e4a1b0a14765529736e36277d977c7c4db7 100644 (file)
@@ -373,7 +373,7 @@ add_emoji (GtkWidget    *box,
   pango_layout_get_extents (layout, &rect, NULL);
 
   /* Check for fallback rendering that generates too wide items */
-  if (rect.width >= 2 * chooser->emoji_max_width)
+  if (rect.width >= 1.5 * chooser->emoji_max_width)
     {
       gtk_widget_destroy (label);
       return;